package com.lagou.cxz.dao;/*
 *Author:cxz
 *@Date:${Date}
 */

import static org.hibernate.jpa.QueryHints.HINT_COMMENT;

import com.lagou.cxz.dao.entity.Article;
import java.util.List;
import javax.persistence.QueryHint;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.QueryHints;

public interface UserDao extends JpaRepository<Article, Integer> {

    @QueryHints(value = {@QueryHint(name = HINT_COMMENT, value = "a query for pageable")})
    @Query(value = " select * from t_article ", nativeQuery = true)
    public List<Article> getArticleAll(Pageable pageable);
}
